﻿@model GameSchool.ViewModels.Home.NavigationViewModel
<ul class="nav nav-list">
    <li class="nav-header">Kennsla</li>
    <li><a href="/"><i class="icon-home"></i>Forsíða</a></li>
    <li><a href="@Url.Action("Recent", "Home")"><i class="icon-inbox"></i>Nýtt efni</a></li>
    <li><a href="@Url.Action("List", "Course")"><i class="icon-th-list"></i>Námskeið</a></li>
    @if (!Model.courses.Any())
    {
        <li class="divider"></li>
        <li><i class="icon-warning-sign"></i>Þú ert ekki skráð(ur) fyrir neinum námskeiðum</li>
    }
    else
    {
        foreach (var course in Model.courses)
        {
        <li class="nav-header popover-namskeid"><a href="@Url.Action("EditStudents", "Course", new { id = course.CourseID })">
            @course.Name</a></li>
        <li><a href="@Url.Action("List", "Video", new { id = course.CourseID })"><i class="icon-film">
        </i>Myndbönd</a></li>
        <li><a href="@Url.Action("List", "Project", new { id = course.CourseID })"><i class="icon-file">
        </i>Verkefni</a></li>
        <li><a href="@Url.Action("List", "Exam", new { id = course.CourseID })"><i class="icon-list-alt">
        </i>Próf</a></li>
        <li><a href="@Url.Action("EditRules", "Course", new { id = course.CourseID })"><i
            class="icon-cog"></i>Reglur</a></li>
        }
    }
</ul>
<script type="text/javascript">
    $('.popover-namskeid').popover({
        title: 'Námskeið',
        content: 'Smelltu hér til fyrir nemendaskráningu í áfangann',
        delay: { show: 100, hide: 100 }
    });
</script>